package thread;

public class TreadDemo3 {
    public static void main(String[] args) {
//        Thread t1=new Thread(new Runnable() {
////            @Override
//            public void run() {
//                for (int i=0;i<100;i++){
//                    System.out.println("你谁啊");
//                }
//            }
//        });
        Thread t1=new Thread(()->{ for (int i=0;i<100;i++){
                    System.out.println("你谁啊");
                }});
//
//        Runnable r2=new Runnable() {
//            @Override
//            public void run() {
//                for (int i=0;i<100;i++){
//                    System.out.println("开门啊，修水管的");
//                }
//
//
//            }
//        };
        Runnable r2=() ->{ for (int i=0;i<100;i++){
                    System.out.println("开门啊，修水管的");
                }
        };
        Thread t2=new Thread(r2);
        Thread t3=new Thread(){
            public void run(){
                for (int i=0;i<100;i++){
                    System.out.println("还不开门");
                }
            }
        };
        t3.start();
        t2.start();
        t1.start();
        Thread t5=new Thread(new Runnable() {
            @Override
            public void run() {

            }
        });
    }
}
